import { expect } from 'chai';
import {replaceEnvVar} from '../src/util'


describe('replaceEnvVar', () => {
    it('should replace environment variables in git tag input', () => {
        // Mock process.env
        const originalEnv = process.env;
        process.env = { ...originalEnv, TEST_ENV_VAR: 'test-value' };

        expect(replaceEnvVar('${TEST_ENV_VAR}_2024')).to.equal('test-value_2024');

        process.env = originalEnv;
    });
    it('should return the input string if no environment variables are found', () => {
        const result = replaceEnvVar('1.0.0');
        expect(result).to.equal('1.0.0');
    });

});
